<template>
  <div>
    <el-card style="margin-top: 50px;">
      <el-descriptions title="商家信息" border>
        <el-descriptions-item
            :rowspan="2"
            :width="140"
            label="店铺头像"
            align="center"
        >
          <el-image
              style="width: 100px; height: 100px"
              :src= "storeInfo.userImg"
          />
        </el-descriptions-item>
        <el-descriptions-item label="商铺名称">{{storeInfo.storeName}}</el-descriptions-item>
        <el-descriptions-item label="店主">{{storeInfo.phone}}</el-descriptions-item>
        <el-descriptions-item label="订餐电话">{{storeInfo.phone}}</el-descriptions-item>
        <el-descriptions-item label="商户评分">
          <div class="demo-rate-block" >
            <el-rate v-model="storeInfo.storeScore" size="small" disabled/>
          </div>
        </el-descriptions-item>
        <el-descriptions-item label="商户经营状态">{{storeInfo.storeStatus==0?'歇业':'正常经营'  }}</el-descriptions-item>
        <el-descriptions-item label="开始经营时间">{{storeInfo.storeStartTime }}</el-descriptions-item>
        <el-descriptions-item label="结束经营时间">{{storeInfo.storeEndTime  }}</el-descriptions-item>
      </el-descriptions>
    </el-card>
  </div>
</template>
<script>
import axios from 'axios';
export default {
  name: 'StoreInfo',
  data() {
    return {
      storeInfo:{},
    }
  },
  methods: {
    getStoreInfo(){
      axios.get("/meals/store/selectStoreByUserId",{
        params:{
          userId:JSON.parse(localStorage.getItem("userId"))
        }
      }).then(res=>{
        this.storeInfo = res.data.data
        console.log(this.storeInfo)
      })
    },

  },
  created(){
    this.getStoreInfo()

  }
}
</script>
<style scoped>

</style>